Skip to content

Add GIF support to Coil ImageLoader#7285

Merged
grzesiek2010 merged 2 commits into
getodk:masterfrom
grzesiek2010:COLLECT-7281
Jun 30, 2026
Merged

Add GIF support to Coil ImageLoader#7285
grzesiek2010 merged 2 commits into
getodk:masterfrom
grzesiek2010:COLLECT-7281

Conversation

@grzesiek2010

@grzesiek2010 grzesiek2010 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Closes #7281

Why is this the best possible solution? Were any other approaches considered?

Coil does not include a GIF decoder by default. If we want GIF support, we need to add it explicitly.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Animated GIFs now play correctly again in the image widget, restoring the pre-migration behavior.
The fix is simple: it does not change how other image types are displayed and only re-enables GIF playback, so it should be safe.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 requested a review from seadowg June 26, 2026 07:50
@grzesiek2010 grzesiek2010 marked this pull request as ready for review June 26, 2026 07:50
SingletonImageLoader.setSafe { context ->
ImageLoader.Builder(context)
.components {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note for testers: there's different implementations for Android 9 and above, so we should check Android 8.

@grzesiek2010 grzesiek2010 requested a review from seadowg June 30, 2026 09:42
@grzesiek2010 grzesiek2010 merged commit f271d5c into getodk:master Jun 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Added gif image doesn't move in image widget

2 participants